<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>通达网络办公系统</title>
<link href="<?php echo base_url()?>css/base.css" type="text/css" rel="stylesheet" />
<link href="<?php echo base_url()?>css/common.css" type="text/css" rel="stylesheet" />
<link href="<?php echo base_url()?>css/pages.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url()?>js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>js/Clock.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>js/members.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>/js/menu.js"></script>
<!--[if lte IE 6]>
<script type="text/javascript" src="js/DD_belatedPNG.js"></script>
    <script type="text/javascript">
        DD_belatedPNG.fix('*');
    </script>
<![endif]-->
<script type="text/javascript">
$(function(){
	
	$("#SendAddress1").val('');
	$(".pnav-box").find('span').click(function(){
		$(this).toggleClass("btn-fold");
		$(this).parents().next("ul").toggle();
	});
})
function sub(){
	if($("input[name='title']").val()==''){
		alert("标题为必填项！");
		$("input[name='title']").focus();
		return false ;
	}
	if($("#SendAddress").html()==''){
		alert("请从右侧联系人中选择收件人！");	
		return false ;
	}
	return true ;
	
}

</script>


</head>

<body>
<!-- OAindex{ -->
<div class="oaindex">
	<?php include_once("system_header.php");?>
    <div class="clearfix">
        <?php include_once("system_left.php");?>
        <!-- right_box{ -->
        <div class="right_box">
			<form method="post" action="/index.php/article/atricle_insert/<?php echo $num;?>" enctype="multipart/form-data" onsubmit="return sub();">
            <div class="the_current">
				<span></span>
				<p>当前位置：首页&nbsp&nbsp>>&nbsp&nbsp内容</p>
            </div>
			<div class="e_mail clearfix ">
				<table style="margin-left:25px; float:left;">
					<tr>
                    	<td width="50">标题：</td>
                        <td><input  class="recipients" type="text" name="title"></td>
                    </tr>
                	<tr>
                    	<td width="50">接收人：</td>
                        <td><textarea style="width:350px;overflow-y:visible;" id="SendAddress" readonly class="recipients" ></textarea>
						<input name="memberids" type="hidden" id="SendAddress1" ></td>
                    </tr>
					<tr>
                    	<td width="50">内容：</td>
                        <td><textarea name="content" rows="5" cols="20" class="recipients he300"></textarea></td>
                    </tr>
					<?php foreach($articlelog as $item):?>
					<tr>
                    	<td><?php echo $item['formtext'];?>：</td>
                        <td>
						<?php if($item['textype']=='text'){?> 
						<input type="text" name="<?php echo $item['fieldname']?>" class="recipients">
						<?php }elseif($item['textype']=='textarea'){?>
						<textarea name="<?php echo $item['fieldname']?>" rows="5" cols="20" class="recipients he300"></textarea>
						<?php }elseif($item['textype'] =='file'){?>
						
						<input type="file" name="<?php echo $item['fieldname']?>" size="20" class="recipients"/>
						<input type="hidden" value="<?php echo $item['fieldname']?>" name="file_L_name">
						<?php }?></td>
					</tr>
						<?php endforeach;?>
					<tr>
						<td class="function_button"  colspan="2">
						
						<input type="submit" value="提交" /><input type="reset" value="重置" /><a href="javascript:history.go(-1);">返回</a></td>
					</tr>
                   
                </table>
                <div class="contact_box fr">
					<h3>联系人</h3>
					<div class="contacts" id="tbAddrTree" >					
						<div class="pnav-cnt">
							<?php foreach($depart as $item):?>
                        	<div class="pnav-box" id="letter-b">
                            	<div class="box-title">                                  
                                    <span class='btn-unfold'><?php echo $item['name']?></span>
    							</div>								
                                <ul class="box-list" style="display:none"> 
									<?php foreach($item['member'] as $member):?>
                                	<li membername="<?php echo $member['username'];?>" memberid="<?php echo $member['id'];?>"><nobr><a style="cursor:pointer"><?php echo $member['username'];?></a></nobr></li>	
									 <?php endforeach;?>
                                </UL>
                         	</div>
							<?php endforeach;?>							
						</div>
					</div>
					<div id="bxAddrFly" style="display:none;" ></div>
                </div>
			</div>
            </form>
        </div>
        <!-- }right_box -->
    </div>
    <?php include_once("system_footer.php");?>
</div>
<!-- }OAindex -->
</body>
</html>
